//
//  ItemBaseView.m
//  MindBox
//
//  Created by MS on 16-1-2.
//  Copyright (c) 2016年 Lemon. All rights reserved.
//

#import "ItemBaseView.h"
#import "UIImageView+WebCache.h"
@interface ItemBaseView ()

@property (weak, nonatomic) IBOutlet UILabel *title;
@property (weak, nonatomic) IBOutlet UILabel *subTitle;
@property (weak, nonatomic) IBOutlet UIImageView *imageView;

@end

@implementation ItemBaseView

-(void)setPopCat:(Pop_Cat *)popCat
{
    _popCat = popCat;
    self.title.text = popCat.obj_name;
    self.subTitle.text = popCat.my_description;
    [self.imageView sd_setImageWithURL:[NSURL URLWithString:popCat.image_url]];
}

+(instancetype)itemBaseView
{
    return [[[NSBundle mainBundle] loadNibNamed:NSStringFromClass([self class]) owner:nil options:nil] lastObject];
}


/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
